package com.example.mvpdemo.simple1;

//要持有M层的引用
//要持有V层的引用
//对M层和V层进行关联
public class LoginPresnter {

    private LoginModule loginModule;
    private LoginView loginView;

    public LoginPresnter(LoginView loginView){
        this.loginView = loginView;
        this.loginModule = new LoginModule(this);
    }

    public void login(String username,String password)
    {
        this.loginModule.login(username, password);
    }

    public void loginResult(String ret)
    {
        loginView.onLoginResult(ret);
    }
}
